package com.scd.boot.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import com.scd.boot.mvc.interceptor.CheckSignInterceptor;

@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    private CheckSignInterceptor checkSignInterceptor;

    public WebMvcConfig(CheckSignInterceptor checkSignInterceptor) {
        this.checkSignInterceptor = checkSignInterceptor;
    }


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(checkSignInterceptor).addPathPatterns("/sign/**");
    }
}
